package com.yjk.example.daoDemo.service.impl;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.yjk.example.daoDemo.mybatis.entity.UserShowInfo;
import com.yjk.example.daoDemo.mybatis.mapper.UserShowInfoMapper2;
import com.yjk.example.daoDemo.service.IUserShowInfoService2;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

/**
 * @author yujiakui
 * @version 1.0
 * Email: jkyu@haiyi-info.com
 * date: 2018/11/12 下午9:21
 * description：
 **/
@Service
public class UserShowInfoServiceImpl2 extends
        ServiceImpl<UserShowInfoMapper2, UserShowInfo> implements IUserShowInfoService2,InitializingBean {
/*
@Component
public class UserShowInfoServiceImpl2 extends CatTest<UserShowInfoMapper2> implements IUserShowInfoService2 ,InitializingBean{
*/


    @Override
    public UserShowInfo selectByTargetIdAndFlag(String targetId, String publishFlag) {
        return baseMapper.selectByTargetIdAndFlag(targetId,publishFlag);
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        UserShowInfo userShowInfo = this.selectByTargetIdAndFlag("2018101700001","1");
        System.out.println(userShowInfo);
    }
}
